<h1><?php echo $title;?></h1>
<br>
<p><?php echo anchor("studentschedule/create", '<button class="btn" type="button">Add new Schedule</button>');?></p>
<br>
<?php
if ($this->session->flashdata('message')){
	echo "<div class='message'>".$this->session->flashdata('message')."</div>";
}

if (count($schedules)){
	echo "<table id='rounded-corner' class='bordered-table zebra-striped' cellspacing='0' cellpadding='3' width='100%'>\n";
	echo "<thead>\n<tr valign='top'>\n";
	echo "<th>No</th><th>Student Schedule</th><th>Semester</th><th>Shift</th><th>Group</th><th>Batch</th><th>Year</th><th>Activate</th><th>Actions</th>\n";
	echo "</tr>\n</thead>\n<tbody>\n";
	$i = 1;
	foreach ($schedules as $key => $list){
		echo "<tr valign='top'>\n";
			echo "<td align='center'>".$i++."</td>\n";
			echo "<td align='center'>";
				echo "<img title='view image' class='img-popup' style='width:270px;max-width:220px;' src=".base_url().'images/studentschedule/'.$list['schedule_src']." />";
			echo '</td>';
			echo "<td align='center'>".$list['semester']."</td>\n";
			echo "<td align='center'>".$list['title']."</td>\n";
			echo "<td align='center'>".$list['group']."</td>\n";
			echo "<td align='center'>".$list['batch']."</td>\n";
			echo "<td align='center'>".$list['year']."</td>\n";
			if($list['activate']==1) 
				$activate = 'active';
			else 
				$activate = 'inactive';
				
			echo "<td align='center'>". $activate."</td>\n";
			echo "<td align='center'>";
				echo anchor('studentschedule/edit/'.$list['student_schedule_id'],'edit');
				echo " | ";
				echo anchor('studentschedule/delete/'.$list['student_schedule_id'],'delete',array('class'=>'delete-item'));
			echo "</td>\n";
		echo "</tr>\n";
	}
	echo "</tbody>\n</table>";
}
?>